import React from 'react';
import ReactEcharts from 'echarts-for-react';

var createReactClass = require('create-react-class');
const Line3 = createReactClass({
  propTypes: {},
  getOtion: function() {
    const option = {
      xAxis: {
        type: 'category',
        boundaryGap: false,
        data: [
          '12-01',
          '12-02',
          '12-03',
          '12-04',
          '12-05',
          '12-06',
          '12-07',
          '12-08',
          '12-09',
          '12-10',
        ],
      },
      title: {
        text: '总计: 50',
        textStyle: {
          fontSize: 12,
        },
      },
      yAxis: {
        type: 'value',
      },
      series: [
        {
          data: [2, 3, 17, 19, 26, 27, 37, 41, 48, 50],
          type: 'line',
          areaStyle: {},
        },
      ],
    };

    return option;
  },
  render: function() {
    return (
      <ReactEcharts
        option={this.getOtion()}
        theme="dark"
        style={{ height: '99%', width: '100%' }}
        className="react_for_echarts"
      />
    );
  },
});

export default Line3;
